<template>
  <div class="cms-label" :class="`style_${type}`">
    <div class="label-charge">
      <div class="free w-9 h-5 text-xs text-[#fff] text-center leading-5">免费</div>
      <div class="vip w-9 h-5 text-sm text-[#fff] text-center">VIP</div>
      <div class="gold text-xs text-[#fff] text-center flex justify-center">
        <pay-circle-outlined style="margin-top: 3px" />
        <p class="ml-[3px] leading-5">50</p>
      </div>
    </div>
    <p class="tips">用法示例</p>
    <div class="example">
      <div class="free w-9 h-5 text-xs text-[#fff] text-center leading-5">免费</div>
      <img class="img-show" src="/src/components/cms/components/src/assets/img/battle-honour.webp" alt="" />
      <p class="video-renew">更新至10集</p>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import cmsLabelViewProps from './props'
import { PayCircleOutlined } from '@ant-design/icons-vue'

export default defineComponent({
  props: cmsLabelViewProps,
  data() {
    return {
      baseUrl: '/src/components/cms/components/'
    }
  },
  components: {
    PayCircleOutlined
  }
})
</script>
<style scoped lang="less">
.cms-label {
  width: 375px;
  padding: 8px 16px;
  background-color: #fff;

  .gold {
    width: 42px;
    height: 20px;
  }
  .free {
    background-image: linear-gradient(135deg, #ffa45d 0%, #ff613f 100%);
  }
  .vip,
  .gold {
    background-image: linear-gradient(135deg, #eed78e 0%, #cbae6c 100%);
  }
  .label-charge {
    @apply flex justify-start gap-x-5;
  }
  .tips {
    font-size: 12px;
    color: #a6a6a6;
    letter-spacing: 0;
    font-weight: 400;
    margin-top: 16px !important;
  }

  .example {
    width: 164px;
    height: 92px;
    margin-top: 8px;
    position: relative;
    .img-show {
      width: 164px;
      height: 92px;
      border-radius: 8px;
      object-fit: cover;
    }
    .video-renew {
      font-size: 12px;
      color: #ffffff;
      line-height: 12px;
      text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
      font-weight: 400;
      position: absolute;
      right: 8px;
      bottom: 6px;
    }
    .free {
      position: absolute;
      top: 0;
      right: 0;
    }
  }
  &.style_1 {
    .free,
    .vip,
    .gold {
      border-radius: 0 8px 0 8px;
    }
  }
  &.style_2 {
    .free,
    .vip,
    .gold {
      border-radius: 20px;
    }
  }
  &.style_3 {
    .free,
    .vip,
    .gold {
      border-top-left-radius: 20px;
      border-bottom-left-radius: 20px;
    }
  }
}
</style>
